package com.qingfeng;

import com.qingfeng.client.service.DealQueueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author zhangyuefei
 * @version 1.0
 * @date 2020/3/11 10:34 上午
 */
@Component
public class MyApplicationRunner implements ApplicationRunner {

    @Autowired
    private DealQueueService dealQueueService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("项目启动执行方法");
        dealQueueService.initQueue();
        dealQueueService.startDealQueue();
    }
}
